﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DomainModel
{
    public class ClearanceItem:OrderItem
    {
        //gives 50% off
        public override void AddDiscount()
        {
            sub_total = sub_total * 0.5;
        }

        //buy one get one free
        public override void BuyOneGetOneFree()
        {
            quantity = quantity + 1;
        }

        //deal all items from 1 to 50
        public override void DailyDeal()
        {
            if (product_id > 0 && product_id < 51)
                sub_total = sub_total * 0.9;
        }
    }
}
